-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix clearing up Door Lock users and credentials #37900
Fix clearing up Door Lock users and credentials #37900
Conversation
Properly clear user/credential by setting status to Available and clearing other attributes when removing user/credential during `OnFabricRemoved`. Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
PR #37900: Size comparison from ee95bd2 to 81aec8a Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@adigie could we automate an integration test to validate this? Do we have the ability to factory reset our test examples? |
@@ -2173,6 +2173,16 @@ bool DoorLockServer::clearFabricFromUsers(chip::EndpointId endpointId, chip::Fab | |||
user.lastModifiedBy = kUndefinedFabricIndex; | |||
} | |||
|
|||
if (user.createdBy == kUndefinedFabricIndex && user.lastModifiedBy == kUndefinedFabricIndex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per spec, users/credentials should not be removed on fabric removal.
If they should be removed on factory reset (which is different from fabric removal), then that should happen in whatever code handles factory reset.
Of course if you think the spec here should change please bring that up in the relevant TT. But the door lock TT was very explicit about not removing users/credentials on fabric removal.
Closing as this will be handled in platform specific code that is not yet upstreamed. |
Problem
Door Lock user/credential is not cleared during factory reset. The issue was observed on nRF52 and nRF53 platforms.
Reproduction steps:
Result
Changes
Properly clear user/credential by setting status to Available and clearing other attributes when removing user/credential during
OnFabricRemoved
.Testing
Manually verified removal of user/credential during factory reset.